package com.heima.model.common.dtos;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
public class CommentSaveDTO {
    /**
     * 文章id
     */
    @NotNull(message = "文章id不能为空!")
    private Long articleId;
    /**
     * 评论内容
     */
    @NotEmpty(message = "评论内容不能为空!")
    @Length(max = 140,message = "评论不能超过140个字")
    private String content;
}